﻿Imports Utilitario
Imports System.Data.SqlClient
Public Class EjecutorSQL
    Inherits ConexionSQL
    Public Function EjecutaProcedures(ByVal nombre As String) As Boolean
        Dim SQLCmd As New SqlCommand
        Using dbConn As New SqlConnection(cadena)
            Try
                dbConn.Open()
                
                SQLCmd.Connection = dbConn
                SQLCmd.CommandType = CommandType.StoredProcedure
                SQLCmd.CommandText = nombre
                SQLCmd.ExecuteNonQuery()

                Return True
            Catch ex As Exception
                MsgBox("Error al abrir la base de datos " & vbCrLf & ex.Message)
                Return False
            Finally
                dbConn.Close()
            End Try
        End Using
    End Function
End Class
